﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EarthGrid.core
{
    public class Point
    {
        private LonLat lon;
        public LonLat Lon { get => lon; set => lon = value; }

        private LonLat lat;
        public LonLat Lat { get => lat; set => lat = value; }

        private Double height;
        public Double Height { get => height; set => height = value; }

        public Point() { }

        public Point(LonLat lon, LonLat lat)
        {
            this.Lon = lon;
            this.Lat = lat;
        }

        public Hemisphere Hemisphere()
        {
            bool dong = lon.Du > 0 || lon.Fen > 0 || lon.Miao > 0;
            bool bei = lat.Du > 0 || lat.Fen > 0 || lat.Miao > 0;
            if (dong)
                return bei ? core.Hemisphere.G0 : core.Hemisphere.G2;
            else
                return bei ? core.Hemisphere.G1 : core.Hemisphere.G3;
        }

    }
}
